/**
 * Created by 86135 on 2020/2/19.
 */
public class Test10 {
    public static void main(String[] args) {

        int[] arr = {11,21,5,12,7,14};
        int[] aar = interchange(arr);
        for (int i = 0; i < aar.length; i++) {
            System.out.println(aar[i]);
        }

    }
    public static int[]  interchange (int[] arr){

        int a = arr[0];
        arr[0] = arr[arr.length-1];
        arr[arr.length-1] = a;
        return arr;
    }
}
